package comday04.itheima01;

public class Demo08 {
    public static void main(String[] args) {

        int[] arr = new int[5];

        int[] arr2 = arr;

        arr = null; //把arr记录的地址值给清空的

        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }   //空指针

        for (int i = 0; i < arr2.length; i++) {
            System.out.println(arr2[i]);
        }   // 0 0 0 0 0

    }
}
